#include "enter.h"
#include "ui_enter.h"

Enter::Enter(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Enter)
{
    ui->setupUi(this);
    ui->error->hide();
}

Enter::~Enter()
{
    delete ui;
}

void Enter::on_return_2_clicked()
{
    this->hide();
    MainWindow *m=new MainWindow;
    m->show();
}


void Enter::on_pushButton_clicked()
{
    QString Account=ui->account->text();
    QString Pass=ui->password->text();
    if(Account=="123456"&&Pass=="111111")
    {
        this->hide();
        Admin *m=new Admin;
        m->show();
    }
    else
        ui->error->show();
}

